// components/goods/goods.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    src: String,
    srcd: String,
    details: String,
    price: Number,
    score:Number
  },
  // src: 商品方形展示图的url,
  // srcd: 商品详细长展示图的url,
  // details: 商品详细介绍名称,
  // price: 商品价格,
  // score: 商品积分

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    handleEvent(event){
      //console.log(event)
      const dataset = event.currentTarget.dataset;
      const details = dataset.details;
      const price = dataset.price;
      const src = dataset.src;
      const srcd = dataset.srcd;
      const score = dataset.price*100;
      //console.log(src,price,details,score)
      this.triggerEvent('data', { src, details, price, score, srcd},{})
    }
  }
// 给market商城页面传递各种参数数据的监听方法

})
